

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>上传客户端软件</title>
<script src="D:/working/LPP/lpp-web/src/main/webapp/statics/dwz/js/jquery-1.7.2.js" type="text/javascript"></script>
	<link href="D:/working/LPP/lpp-web/src/main/webapp/statics/dwz/uploadify/css/uploadify.css" rel="stylesheet" type="text/css" media="screen"/>
	<script src="D:/working/LPP/lpp-web/src/main/webapp/statics/dwz/uploadify/scripts/jquery.uploadify.js" type="text/javascript"></script>
	
    <style>
        .my-uploadify-button {
            width: 100px;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            //初始化uploadify 用于word上传
            $("#fileQueue").uploadify({

                swf: 'D:/working/LPP/lpp-web/src/main/webapp/statics/dwz/uploadify/scripts/uploadify.swf', <!-- 加载上传的进度条的文件 -->

                uploader: '${contextPath }/upload/uploadPicAction.action', <!-- 文件提交到后台的action -->

                formData: {PHPSESSID: 'xxx', ajax: 1}, <!-- 对象和额外的数据发送到服务器端上传脚本与每一个文件上传 -->
                fileSizeLimit: '2000KB', <!-- 限制文件大小 -->
                fileTypeDesc: '*.jpg;*.jpeg;*.gif;*.png;', <!-- 限制文件格式 -->
                fileTypeExts: '*.jpg;*.jpeg;*.gif;*.png;', <!-- 限制文件类型 -->
                fileObjName: 'picUp', <!-- 为action中文件的名字一样,这样才能注入进来 -->

                queueID: 'fileQueue', <!-- ile对象的名称用在服务器端脚本 -->

                buttonImage: 'D:/working/LPP/lpp-web/src/main/webapp/statics/dwz/uploadify/img/add.jpg', <!-- 按钮图片的加载地址 -->

                buttonClass: 'my-uploadify-button', <!-- 按钮的类型,DWz封装好的类型,执行相应的类型即可 -->
                width: 82,
                <!-- 是否自动上传文件添加到队列中,false不能自动上传,进入队列,true自动上传 -->
                auto: false
            });
        });

        function navTabAjaxDone(json) {
            //DWZ.ajaxDone(json);
            if (json.statusCode == DWZ.statusCode.ok) {
                if ("queryData") { //把指定navTab页面标记为需要“重新载入”。注意navTabId不能是当前navTab页面的
                    navTab.reloadFlag("lastestVersion");
                } else { //重新载入当前navTab页面
                    navTabPageBreak();
                }
                if ("closeCurrent" == json.callbackType) {
                    setTimeout(function () {
                        navTab.closeCurrentTab();
                    }, 100);
                } else if ("forward" == json.callbackType) {
                    navTab.reload(json.forwardUrl);
                }
            }
        }
    </script>
</head>
<body>
<form enctype="multipart/form-data" action="/updateVersion" method="post" class="pageForm required-validate"
onsubmit="return validateCallback(this, navTabAjaxDone);">
<input type="file" name="fileQueue" id="fileQueue"/>
<div id="fileQueue" class="fileQueue" style="width: 100%;height: 150px;"></div>
<input type="image" src="D:/working/LPP/lpp-web/src/main/webapp/statics/dwz/uploadify/img/upload.jpg"
onclick="$('#testFileInput2').uploadify('upload', '*');"/>
<input type="image" src="D:/working/LPP/lpp-web/src/main/webapp/statics/dwz/uploadify/img/cancel.jpg"
onclick="$('#testFileInput2').uploadify('cancel', '*');"/>
<div class="divider"></div>
</form>
</body>
</html>